1. Field of the Invention
The present invention relates to an image processing apparatus, control method, and computer-readable medium which perform image data compression processing in order to compress an image for each predetermined block, image processing for the data compressed for each predetermined block, and processing of restoring the processed data to the original image data. The present invention more particularly relates to processing of rotating the compressed data in its restoration.
2. Description of the Related Art
High-resolution color images have conventionally been in high demand. To meet the demands to improve image quality, it is becoming a common practice to process, by a digital multi-functional peripheral, images with resolutions of 1,200 dpi (dots per inch) or more. To save space on a memory/hard disk and to shorten the time taken to write data on it, not only a digital multi-functional peripheral but also image processing apparatuses (digital camera and facsimile apparatus) which process these images compress color image data to achieve cost reduction and speedup. As color still image compression schemes, a JPEG scheme which uses discrete cosine transformation and a scheme which uses wavelet transformation have conventionally widely been employed.
With an increase in resolution, the number of pixels which require image processing typified by rotation processing is dramatically increasing, so the processing load is getting heavier. For example, upon doubling the resolution from 600 dpi to 1,200 dpi, the number of pixels to be processed quadruples. When the above-mentioned image compression is employed, processing of decoding the compressed data becomes necessary to refer to and convert the pixel data with the doubled resolution. In other words, image processing typified by rotation processing cannot be performed for the compressed data intact, so its decoding processing inevitably becomes necessary. This makes it necessary to process all pixels in the high-resolution data for each pixel, thus prolonging the processing time.
Japanese Patent Laid-Open No. 2002-271791 discloses an image encoding apparatus which rotates an encoded image in its decoding. The image encoding apparatus described in Japanese Patent Laid-Open No. 2002-271791 divides an image into blocks of M×N pixels, performs its variable-length coding, and adds code information indicating the code length and the first address to be stored for each variable-length code in each image block. In rotating the image data through 90°, 180°, and 270° in its decoding, the block read order is changed.
However, in the image encoding apparatus described in Japanese Patent Laid-Open No. 2002-271791, because an image in each block is rotated in its decoding, storage in a buffer, and transfer to a band memory, not only a high-speed arithmetic unit or dedicated hardware but also a buffer memory becomes necessary, thus entailing a high cost. Furthermore, because the compressed data is decoded and then rotated, it takes much time to process a high-resolution image.
The present invention has been made in consideration of the above-mentioned problems, and provides an image processing apparatus which requires only a short period of time to process even a high-resolution image despite its low cost by easily performing rotation processing for compressed data.